import request from '@/utils/request'

// 查询领用-协助信息列表
export function listAssist(query) {
	return request({
		url: '/project/wtc/assist/list',
		method: 'get',
		params: query
	})
}

// 查询领用-协助信息详细
export function getAssist(id) {
	return request({
		url: '/project/wtc/assist/' + id,
		method: 'get'
	})
}

// 新增领用-协助信息
export function addAssist(data) {
	return request({
		url: '/project/wtc/assist',
		method: 'post',
		data: data
	})
}

// 修改领用-协助信息
export function updateAssist(data) {
	return request({
		url: '/project/wtc/assist',
		method: 'put',
		data: data
	})
}

// 删除领用-协助信息
export function delAssist(id) {
	return request({
		url: '/project/wtc/assist/' + id,
		method: 'delete'
	})
}

export function searchA(id) {
	return request({
		url: '/project/wtc/assist/list/a/' + id,
		method: 'get'
	})
}

export function searchUser(userId) {
	return request({
		url: '/project/wtc/assist/list/' + userId,
		method: 'get',
		params: userId
	})
}

export function checkUser(name) {
	return request({
		url: '/project/wtc/assist/list/uId',
		method: 'get'
	})
}

export function assistRole(query) {
	return request({
		url: '/project/wtc/assist/role',
		method: 'get',
		params: query
	})
}
